package serviceImpl;

import dao.UserMapper;
import entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import service.UserService;
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public User getUserByUserID(String userID) {
        return userMapper.getUserByUserID(userID);
    }

    @Override
    public User getUserByUserIDAndPassword(String userID, String password) {
        return userMapper.getUserByUserIDAndPassword(userID,password);
    }

    @Override
    public void updateUser(User user) {
        int number =  userMapper.updateUser(user);
        System.out.println("用户更新影响行数："+number);
    }
}
